*{
    padding: 0;
    margin: 0;
    list-style: none;
    text-decoration: none;
}
html,body{
    width: 100%;
    height: 100%;
    background-image: linear-gradient(-120deg,#e0c3fc,#8ec5fc);
}
.container{
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.menu{
    width: 300px;
    border-radius: 8px;
    overflow: hidden;
}
.item{
    border-top: 1px solid #2980b9;
    overflow: hidden;
}
.btn{
    display: block;
    padding: 16px 20px;
    background: #3498db;
    color: white;
    position: relative;
}
/* 小三角 */
.btn:before{
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #3498db;
    left: 20px;
    bottom: -7px;
    transform: rotate(45deg);
}
.btn i{
    margin-right: 10px;
}
.cmenu{
    background: #333;
    overflow: hidden;
    transition: max-height 0.3s;
    max-height: 0;
}
.cmenu a{
    display: block;
    padding: 16px 26px;
    color: white;
    font-size: 14px;
    margin: 4px 0;
    position: relative;
}
.cmenu a:before{
    content: '';
    position: absolute;
    width: 6px;
    height: 100%;
    background: #3498db;
    left: 0;
    top: 0;
    transition: 0.3s;
    opacity: 0;
}
.cmenu a:hover::before{
    opacity: 1;
}
.item:target .cmenu{
    max-height: 10em;
}